<template>
	<view class="content" v-show="isShow">
		<view class="uni-flex-top">
			<view class="uni-flex-lefttime">
				您本次的考试分数为
			</view>
			<view class="uni-flex-score">
				{{list.score}}分
			</view>
			<view class="uni-flex-total">
				{{list.remark}}
			</view>
		</view>
		<!--主体-->
		<view class="bot-sure" >
			<button type="warn" @click="doclose"  class="dosure" >退出</button><!-- 这种写法只有h5平台支持，不跨端，不推荐使用 -->
		</view>
		
		
	</view>
</template>

<script>
	const util = require('@/common/util.js')
	import {mapState} from 'vuex'
	
	export default {
		components:{
			
		},
		data() {
			return {
				title: '集团制度考试',
				isShow: false,
				authKey:null,
				list:null
			}
		},
		computed: {
			...mapState(['vote_url','currTime','examState'])
		},
		onLoad(option) {
			this.authKey = !util.isEmpty(option.authKey) ? option.authKey : "";
			if(!util.isEmpty(option.data)){
				this.list = JSON.parse(option.data)
				console.log(this.list)
				this.isShow = true
			}else{
				
			}
			
			// if(!this.examState){
			// 	uni.redirectTo({
			// 		url:'/pages/index/index?authKey=' + this.authKey
			// 	})
			// }
			//this.second = this.currTime
			//this.loadData()
		},
		methods: {
			async loadData() {
			},
			isEmpty(value){
				return util.isEmpty(value);
			},
			doclose(){
				// uni.redirectTo({
				// 	url:'/pages/index/index?authKey='+this.authKey
				// })
				let url = 'https://www.dalinicegroup.com/w/apppage/exam/#/?authKey='+this.authKey
				location.replace(url)
			}
		}
	}
</script>

<style lang="scss">
	%uni-flex {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		
	}

	%uni-flex-inline {
		display: inline-flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}

	.content {
		@extend %uni-flex;
		background: white;
		min-height: 100%;
		justify-content: flex-start;
		
		.uni-flex-top{
			@extend %uni-flex;
			width: 100%;
			background: transparent;
			flex-direction: column;
			justify-content: space-between;
			border-top:1upx solid #efefef;
			
			
			.uni-flex-lefttime{
				@extend %uni-flex;
				font-size: 28upx;
				padding-top:100upx;
				padding-left:0;
				// color:rgb(251, 82, 89);
				color:black;
				
			}
			.uni-flex-score{
				font-size: 48upx;
				color:rgb(251, 82, 89);
				font-weight: bold;
				padding:15upx 0;
			}
			.uni-flex-total{
				@extend %uni-flex;
				font-size: 28upx;
				height:90upx;
				text-align: center;
				color:black;
				.totNum{
					color:rgb(31, 161, 245);
				}
			}
		}
		
	
		.bot-sure{
			@extend %uni-flex;
			width: 100%;
			flex: 1;
			position: relative;
			bottom: 0;
			padding-top:100upx;
			padding-bottom: env(safe-area-inset-bottom) !important;
			.dosure{
				width: 90%;
				border-radius: 50upx;
				font-size: 28upx;
			}
		}
	}
	
</style>
